package com.zyz.E_面向对象.G_this;

/**
 * @author: vick
 * @Date: 2025/3/14
 * @Description:
 * @version: 1.0
 */
public class Person2 {
    private String name;
    private int age;
    private String sex;

    public Person2() {
        //调用有参构造器
        this("vick");
        System.out.println("无参");
    }

    public Person2(String name) {

        this.name = name;
        System.out.println("有参");
    }
}
